<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">

<head>
    <th:block th:include="include :: header('网站设置')" />
    <th:block th:include="include::bootstrap-select-css" />
</head>

<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <div class="tabs-container">
            <ul class="nav nav-tabs" id="config-title">
                <li class="active"><a data-toggle="tab" href="#normal" aria-expanded="true">常规设置</a>
                </li>

            </ul>
            <div class="tab-content">
                <!-- 常规 -->
                <div id="normal" class="tab-pane active">
                    <div class="panel-body">
                        <form class="form-horizontal m" id="form-normal">
                            <div class="form-group">
                                <label class="col-sm-3 control-label is-">开启IOS检查：</label>
                                <div class="col-sm-8">
                                    <input name="oly.app.iosExamine" th:value="${appConfig['oly.app.iosExamine']}"
                                        class="form-control" type="text">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label is-">程序名字：</label>
                                <div class="col-sm-8">
                                    <input name="oly.app.appName" th:value="${appConfig['oly.app.appName']}"
                                        class="form-control" type="text">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label is-">程序Logo：</label>
                                <div class="col-sm-8">
                                    <input name="oly.app.logo" th:value="${appConfig['oly.app.logo']}"
                                        class="form-control" type="text">
                                </div>
                            </div>

                        </form>
                    </div>
                </div>
            </div>
            <br>
            <button type="button" class="btn btn-w-m btn-primary center-block" id="submit-btn">修改</button>
        </div>
    </div>
        <th:block th:include="include :: footer" />
        <th:block th:include="include::bootstrap-select-js" />
        <script type="text/javascript">
            var prefix = ctx + "system/config";
            var myForm = "form-normal";
            $('#config-title a').click(function (e) {
                e.preventDefault();
                $(this).tab('show');
                myForm = $(this).attr('href').replace("#", "form-");
                console.log(myForm);
            });
            function submitHandler() {
                $.operate.save(prefix + "/updateByKey", $('#' + myForm).serialize());

            }
            $("#submit-btn").click(function () {
                submitHandler();
            })
        </script>
</body>

</html>